package net.godcode.olivenotes.services;

import net.godcode.olivenotes.entities.Tag;

/**
 * TagSplitter provides a simple interface for breaking up a string
 * of delimited tags into individual tag instances.
 * 
 * @author Chris Lewis Dec 29, 2007 <chris@thegodcode.net>
 * @version $Id: TagSplitter.java 28 2008-01-20 21:07:51Z burningodzilla $
 */
public interface TagSplitter {
	
	/**
	 * Splits a delimited string into tags, based on the implementation's algorithm.
	 * @param tags The tags as a single String.
	 * @return An array of Tag instances. If the string is <code>null</code> or
	 * empty, the return value will be <code>null</code>.
	 */
	public Tag[] split(String tags);
	
	/**
	 * Splits a delimited string into tags, based on the implementation's algorithm.
	 * @param tags The tags as a single String.
	 * @return An array of tags as String instances. If the string is <code>null</code> or
	 * empty, the return value will be <code>null</code>.
	 */
	public String[] splitAsStrings(String tags);
	
}
